<%@ page import="java.awt.print.Book" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/6/8
  Time: 11:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="css/search.css">
    <link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome.min.css">
    <script type="text/javascript" src="jquery/jquery-3.5.1.min.js"></script>


</head>

<body>
<form action="searchServlet" method="post">
    <input type="text" placeholder="搜索" id="search" name="search" class="search"/>
    <input type="submit" value="搜索" id="search_btn" class="search_btn"/>
</form>

<div class="findbox" >
    <c:if test="${authornum != 0}">
     <div class="title"> 作者：</div>
    <table class="tablelist">
        <thead>
        <tr>
            <th>作者</th>
            <th>作品</th>
        </tr>
        </thead>
        <c:forEach items="${findauthor}" var="author">
            <tr>
                <td> <a class="edit" href="bookServlet?bookname=${author.bookname}&author_name=${author.author_name}">${author.author_name}</a></td>
                <td> <a class="edit" href="bookServlet?bookname=${author.bookname}&author_name=${author.author_name}">${author.bookname}</a></td>
            </tr>
        </c:forEach>
    </table>
    </c:if>


    <c:if test="${booknum != 0}">
        <div class="title"> 作品：</div>
        <table class="tablelist">
        <thead>
        <tr>
            <th>作品</th>
            <th>作者</th>
        </tr>
        </thead>
        <c:forEach items="${findbook}" var="book">
            <tr>
                <td> <a class="edit" href="bookServlet?bookname=${book.bookname}&author_name=${book.author_name}">${book.bookname}</a></td>
                <td> <a class="edit" href="bookServlet?bookname=${book.bookname}&author_name=${book.author_name}">${book.author_name}</a></td>
            </tr>
        </c:forEach>
    </table>
    </c:if>

</div>



</body>

</html>
